The HSM ESCON option uses the IBM channel protocol to emulate a standard tape control. The application programmer need only use Open, Write, Read and Close commands.
When the HSM is defined as a tape control unit, ensure that the Job Control Language (JCL) is using the following parameters:
· Bypass Label Processing (LABEL=BLP).
· Undefined Record Format (RECFM=U).
· Block size less than 1020 bytes.
Most transactions require less than 100 milliseconds of internal processing time, so timeouts should not be a problem (the longest transaction takes approximately three second). However, if the HSM goes down it may not respond to the Host, so a timeout is useful (IODEVICE MACRO, TIMEOUT=Y is the default).
All Write commands to the HSM must be followed by a Read command. This protocol guarantees that the Host receives a response to any transaction initiated, and eliminates any polling sequence by the Host. Whenever the HSM is opened and as part of any channel I/O error recovery, the application program should do a Read operation to ensure that the required "Write/Read" synchronisation is achieved. To prevent hang-ups on the channel, the HSM discards any Write data not preceded by a Read operation.
The ESCON equipment does not use the STX and ETX (X'02' and X'03') characters that other versions of the HSM use to bracket each transaction.
Data in Host messages to the HSM are character data for the majority of commands. For all the standard commands, the HSM expects to see character data. Any binary value may be used in the message header and echoback field EXCEPT X'03'. This is used as an internal "end-of-record" indicator and should never be sent by the Host in the standard commands.
The ESCON equipment returns only one response for every print command (not two, as used by other versions of the HSM).
The HSM uses only one sub-channel address, and that address must be even (e.g. 0,2,4,... X'FC', X'FE').
The HSM emulates a basic magnetic tape and control unit, it is recommended that the HSM is configured as a dummy device.
The HSM supports the following five commands: WRITE, READ, NO OPERATION, SENSE and TEST I/O. Provided the command set is limited to these five commands. Use of any other channel commands in this mode may produce unpredictable results which could jeopardise the manufacturer's ability to support the device.
The following is a description of the commands supported by the HSM and the responses it generates.
The Test I/O command solicits the current status of the HSM specified by the address issued during the initial selection sequence.
If the channel card is not busy, the status byte presented indicates that the addressed HSM is ready for operation or is presenting status stacked from a previous operation. The status is cleared when it is accepted by the Host.
To guarantee that the Host receives a response to any transaction it has sent to the HSM, a Read command must follow every Write command to the HSM. This protocol eliminates polling by the Host. Whenever the HSM is "opened" and as part of any channel I/O error recovery, the application program should issue a Read command to ensure that the required "Write/Read" synchronisation is achieved. To prevent hang-ups on the channel, the HSM discards any Write data if this command had not been preceded by a Read. If no data is available (either there has been no prior Write, or a Write produced no response data), the HSM returns the following ten bytes:
X'4C53', X'0004', X'0001', X'0000', X'0000'
When a Write command is issued from the host, the HSM presents Channel End status only in its ending status after all the data has been transferred. At this point, the Write operation is not completed and the channel has disconnected from the HSM. When the data received on this Write operation has been internally processed by the HSM, the response to this transaction is stored in the channel card buffer ready to be transferred to the host. The HSM reconnects to the channel by raising the Request In line, and presents Device End status during the initial selection sequence. This terminates the Write operation and disconnects from the channel. On the subsequent Read command, the data is transferred to the Host. Channel End and Device End are presented as ending status to this operation.
The No Operation (NOP) command performs no function, does not transfer any data and does not disturb sense data information. Channel End and Device End are presented during the initial status presentation.
The Sense command is normally issued after the HSM has presented Unit Check status and the Host requests sense data. The Sense command causes the HSM to transmit up to 24 sense bytes to the Host. Byte 0 is the only one that has any significance. Byte 1 is always X'44' and byte 2 is X'03'. The other bytes, 3 to 23, are always X'00'. The bit position in byte 0 reflects the conditions present in the HSM at the time the Sense command is issued. The sense information stored in the HSM is reset by System Reset, Selective Reset and the acceptance of any Read or Write command. Channel End and Device End status are presented in the ending status on termination of the Sense command operation.